package com.yy.service.impl;

import java.util.List;

import com.yy.common.utils.DateUtils;
import com.yy.domain.AssetHouseBlock;
import com.yy.mapper.AssetHouseBlockMapper;
import com.yy.service.IAssetHouseBlockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 商圈|小区Service业务层处理
 * 
 * @author yy
 * @date 2023-10-24
 */
@Service
public class AssetHouseBlockServiceImpl implements IAssetHouseBlockService
{
    @Autowired
    private AssetHouseBlockMapper assetHouseBlockMapper;

    /**
     * 查询商圈|小区
     * 
     * @param id 商圈|小区主键
     * @return 商圈|小区
     */
    @Override
    public AssetHouseBlock selectAssetHouseBlockById(Long id)
    {
        return assetHouseBlockMapper.selectAssetHouseBlockById(id);
    }

    /**
     * 查询商圈|小区列表
     * 
     * @param assetHouseBlock 商圈|小区
     * @return 商圈|小区
     */
    @Override
    public List<AssetHouseBlock> selectAssetHouseBlockList(AssetHouseBlock assetHouseBlock)
    {
        return assetHouseBlockMapper.selectAssetHouseBlockList(assetHouseBlock);
    }

    /**
     * 新增商圈|小区
     * 
     * @param assetHouseBlock 商圈|小区
     * @return 结果
     */
    @Override
    public int insertAssetHouseBlock(AssetHouseBlock assetHouseBlock)
    {
        assetHouseBlock.setCreateTime(DateUtils.getNowDate());
        return assetHouseBlockMapper.insertAssetHouseBlock(assetHouseBlock);
    }

    /**
     * 修改商圈|小区
     * 
     * @param assetHouseBlock 商圈|小区
     * @return 结果
     */
    @Override
    public int updateAssetHouseBlock(AssetHouseBlock assetHouseBlock)
    {
        assetHouseBlock.setUpdateTime(DateUtils.getNowDate());
        return assetHouseBlockMapper.updateAssetHouseBlock(assetHouseBlock);
    }

    /**
     * 批量删除商圈|小区
     * 
     * @param ids 需要删除的商圈|小区主键
     * @return 结果
     */
    @Override
    public int deleteAssetHouseBlockByIds(Long[] ids)
    {
        return assetHouseBlockMapper.deleteAssetHouseBlockByIds(ids);
    }

    /**
     * 删除商圈|小区信息
     * 
     * @param id 商圈|小区主键
     * @return 结果
     */
    @Override
    public int deleteAssetHouseBlockById(Long id)
    {
        return assetHouseBlockMapper.deleteAssetHouseBlockById(id);
    }
}
